package com.igeek.oo;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

/**
 * 继承
 *
 *  Animal类是父类
 */
public class Animal {

    public Animal(){
        System.out.println("父类Animal，无参构造函数");
    }
    public Animal(int age) {
        this();
        System.out.println("我是父类：Animal");
    }

    {
        System.out.println("这里是父类Animal 的初始化代码块 ");
        count = 2;
    }

    public static int count;

    static {
        System.out.println("这里是父类Animal 的【静态的初始化】代码块");

        count = 1;
    }
    /**
     * 年龄
     */
    public int age;

    public void eat(){
        System.out.println("动物爱吃饭");
    }

    public void sleep(){
        System.out.println("动物爱睡觉");
    }
}
